package com.czy.owner.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.czy.owner.R;

import java.util.List;

/**
 * Created by King on 2016/10/10 0010.
 */
public class ContactsLabelAdapter extends BaseRecyclerAdapter<String,ContactsLabelAdapter.EmployeeLabelViewHolder> {
    public ContactsLabelAdapter(Context context, List<String> data) {
        super(context, data);
    }

    public ContactsLabelAdapter(Context context, List<String> data, boolean slideEnabled, boolean reboundEnabled) {
        super(context, data, slideEnabled, reboundEnabled);
    }

    @Override
    public EmployeeLabelViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        return new EmployeeLabelViewHolder(layoutInflater.inflate(R.layout.item_contacts_label_recycler,parent,false));
    }

    @Override
    public void onBindViewHolder(EmployeeLabelViewHolder holder, int position) {
        super.onBindViewHolder(holder, position);
        holder.tvLabel.setText(data.get(position));
    }

    public class EmployeeLabelViewHolder extends BaseRecyclerAdapter.ViewHolder{
        private TextView tvLabel;
        public EmployeeLabelViewHolder(View itemView) {
            super(itemView);
            tvLabel = (TextView)itemView.findViewById(R.id.tv_item_contacts_label);
        }
    }
}
